#To-do: 1. Snowcover effects on clp abund for all lakes where the DB has multiple CLP projects - non-local winter data -
#load libraries
library(data.table)
library(tidyr)
library(stringr)
library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
#import Data
surveys <- fread("scripts&data/data/input/lake_year_data.csv")
rawdata <- fread("scripts&data/data/input/PCRIsurveysPICharter2srt_sheet1rawdata.csv")
#data explore
#see if we can re-generate ray's calc'd CLP values
# summary(rawdata)
rawdata[ , .N , .(SURVEY_START, DOW) ]
## SURVEY_START DOW N
## <char> <int> <int>
## 1: 6/25/2008 1000100 85
## 2: 6/18/2012 1010400 34
## 3: 6/8/2011 1010500 80
## 4: 5/24/2010 1014200 216
## 5: 6/21/2012 1014900 43
## ---
## 956: 6/20/2005 86023400 181
## 957: 6/25/2017 86025200 836
## 958: 6/27/2013 86025500 39
## 959: 4/22/2017 86026400 158
## 960: 6/20/2007 86047000 33
names(rawdata)[str_detect(names(rawdata), "pota")]
## [1] "potamogeton_crispus" "potamogeton_amplifolius"
## [3] "potamogeton_foliosus" "potamogeton_pusillus"
## [5] "potamogeton_robbinsii" "potamogeton_zosteriformis"
## [7] "potamogeton_friesii" "potamogeton_gramineus"
## [9] "potamogeton_illinoensis" "potamogeton_natans"
## [11] "potamogeton_nodosus" "potamogeton_praelongus"
## [13] "potamogeton_richardsonii" "potamogeton_strictifolius"
## [15] "potamogeton_sp" "potamogeton_obtusifolius"
## [17] "potamogeton_alpinus" "potamogeton_perfoliatus"
## [19] "potamogeton_epihydrus" "potamogeton_spirillus"
## [21] "potamogeton_bicupulatus" "potamogeton_diversifolius"
## [23] "potamogeton_hillii" "potamogeton_vaseyi"
## [25] "potamogeton_obtusifolius.1" "potamogeton_sp.1"
#alltime max vet depth
a <- rawdata[ , .("survey_ident"= .GRP, "totnsamp" = .N, "clpN" = sum(potamogeton_crispus >= 1, na.rm = T), "lat_median" = median(latitude, na.rm = T), "lon_median" = median(longitude, na.rm = T)) , , .(SURVEY_START, DOW) ][ , clpfoc := clpN/totnsamp ,]
#get snow data https://www.wrcc.dri.edu/cgi-bin/cliMAIN.pl?mn5435
snow <- fread("scripts&data/data/input/MSP_snowfall_alltime.csv")
snow
## Winter_end_year JUL AUG SEP OCT NOV DEC JAN FEB MAR APR
## <int> <int> <int> <num> <num> <num> <num> <num> <num> <num> <num>
## 1: 1939 0 0 0.0 1.9 0.5 9.1 7.4 11.0 6.0 3.9
## 2: 1940 0 0 0.0 0.6 0.0 4.8 5.0 9.1 25.6 0.0
## 3: 1941 0 0 0.0 0.0 26.3 10.6 3.3 5.5 6.8 0.0
## 4: 1942 0 0 0.0 0.0 3.8 8.6 1.7 5.2 4.6 0.0
## 5: 1943 0 0 1.7 0.3 0.9 7.0 10.1 4.6 9.8 0.0
## 6: 1944 0 0 0.0 0.0 10.3 0.0 1.0 4.2 11.1 0.3
## 7: 1945 0 0 0.0 0.0 2.5 1.1 8.2 15.4 0.7 6.0
## 8: 1946 0 0 0.0 0.0 4.5 14.6 4.3 11.9 1.5 0.1
## 9: 1947 0 0 0.0 0.0 4.1 5.9 7.6 1.9 3.3 2.0
## 10: 1948 0 0 0.0 0.0 21.8 6.7 3.5 11.6 5.2 0.3
## 11: 1949 0 0 0.0 0.0 2.5 2.3 12.5 3.4 8.3 9.3
## 12: 1950 0 0 0.0 0.0 2.7 6.5 17.0 7.9 11.1 6.4
## 13: 1951 0 0 0.0 0.0 5.6 25.0 7.1 8.6 40.0 2.6
## 14: 1952 0 0 0.0 0.8 10.8 16.5 9.9 15.0 25.4 0.6
## 15: 1953 0 0 0.0 0.0 10.1 6.0 6.0 13.4 6.7 0.7
## 16: 1954 0 0 0.0 0.0 1.9 5.9 3.6 1.0 10.7 0.2
## 17: 1955 0 0 0.0 0.4 6.4 4.0 7.8 11.0 4.3 0.0
## 18: 1956 0 0 0.0 2.5 6.0 14.6 4.6 2.4 14.0 1.1
## 19: 1957 0 0 0.0 0.0 6.8 2.1 4.9 8.7 7.0 9.6
## 20: 1958 0 0 0.0 0.0 10.3 2.2 2.4 1.2 3.5 1.6
## 21: 1959 0 0 0.0 0.0 3.3 2.4 1.4 6.3 5.7 0.0
## 22: 1960 0 0 0.0 3.7 6.9 3.5 9.5 2.7 5.5 0.0
## 23: 1961 0 0 0.0 0.0 2.4 1.7 4.6 8.7 15.1 7.7
## 24: 1962 0 0 0.1 0.0 2.5 18.1 5.9 26.5 21.8 6.4
## 25: 1963 0 0 0.0 0.0 5.6 3.2 5.0 5.4 9.8 5.5
## 26: 1964 0 0 0.0 0.0 0.0 7.6 5.0 1.0 9.7 5.6
## 27: 1965 0 0 0.0 0.0 4.3 8.1 10.5 11.7 37.1 2.0
## 28: 1966 0 0 0.0 0.0 1.6 1.2 11.9 6.8 14.2 0.4
## 29: 1967 0 0 0.0 0.2 3.4 12.7 35.3 23.7 2.6 0.2
## 30: 1968 0 0 0.0 0.3 0.8 2.4 10.6 2.2 0.8 0.4
## 31: 1969 0 0 0.0 0.0 4.9 28.7 21.6 5.3 7.3 0.3
## 32: 1970 0 0 0.0 2.4 3.8 33.2 9.8 4.3 8.6 1.3
## 33: 1971 0 0 0.0 0.0 6.3 5.5 19.9 13.9 7.0 1.9
## 34: 1972 0 0 0.0 0.0 13.4 12.8 12.2 7.6 10.4 8.0
## 35: 1973 0 0 0.0 0.0 1.1 15.3 11.6 11.3 0.4 2.0
## 36: 1974 0 0 0.0 0.0 0.1 17.9 2.5 15.7 7.7 7.3
## 37: 1975 0 0 0.0 0.0 1.2 6.1 27.4 9.0 18.3 2.2
## 38: 1976 0 0 0.0 0.0 16.2 5.6 12.8 5.1 13.6 0.0
## 39: 1977 0 0 0.0 2.3 1.4 8.3 13.4 1.8 14.6 1.8
## 40: 1978 0 0 0.0 3.0 11.7 14.2 6.8 4.6 8.5 1.9
## 41: 1979 0 0 0.0 0.0 16.5 15.1 14.2 13.5 8.4 0.7
## 42: 1980 0 0 0.0 0.0 7.7 1.7 12.9 8.8 13.7 8.5
## 43: 1981 0 0 0.0 0.0 0.9 2.8 4.6 11.0 0.1 1.7
## 44: 1982 0 0 0.0 0.9 14.0 10.6 46.4 7.4 10.9 4.8
## 45: 1983 0 0 0.0 1.4 3.6 19.3 3.2 10.8 14.3 21.8
## 46: 1984 0 0 0.0 0.0 30.4 21.0 10.8 9.3 17.3 9.8
## 47: 1985 0 0 0.0 0.3 2.0 16.3 13.1 4.2 36.8 0.0
## 48: 1986 0 0 0.4 0.0 23.9 13.5 10.3 12.3 8.7 0.4
## 49: 1987 0 0 0.0 0.0 4.4 4.2 5.5 1.2 2.1 0.0
## 50: 1988 0 0 0.0 0.3 4.5 7.5 19.5 4.5 3.7 2.4
## 51: 1989 0 0 0.0 0.2 15.8 7.2 6.0 17.3 22.7 0.8
## 52: 1990 0 0 0.0 0.0 11.3 7.0 1.1 10.7 3.2 2.2
## 53: 1991 0 0 0.0 0.0 5.0 11.7 6.5 14.2 4.4 1.5
## 54: 1992 0 0 0.0 8.2 46.9 6.7 5.0 5.9 10.8 0.6
## 55: 1993 0 0 0.0 1.3 12.2 9.2 12.0 5.3 6.9 0.5
## 56: 1994 0 0 0.0 0.0 7.7 4.5 24.3 12.0 1.7 5.5
## 57: 1995 0 0 0.0 0.0 6.2 6.5 4.2 2.1 10.4 0.2
## 58: 1996 0 0 0.0 0.7 6.6 16.1 14.5 1.2 14.1 2.3
## 59: 1997 0 0 0.0 0.0 16.8 23.7 14.2 4.0 14.3 0.6
## 60: 1998 0 0 0.0 0.0 8.6 3.3 20.4 1.1 11.6 0.0
## 61: 1999 0 0 0.0 0.0 0.1 3.1 33.1 4.2 16.0 0.0
## 62: 2000 0 0 0.0 0.0 0.7 7.3 18.2 7.7 1.0 1.3
## 63: 2001 0 0 0.0 0.0 9.8 30.2 9.4 16.5 8.6 1.3
## 64: 2002 0 0 0.0 0.1 9.4 8.0 9.5 3.1 15.7 20.2
## 65: 2003 0 0 0.0 0.6 1.4 3.0 5.1 10.7 13.2 1.0
## 66: 2004 0 0 0.0 0.0 9.4 16.1 10.7 19.7 10.4 0.0
## 67: 2005 0 0 0.0 0.0 0.5 1.8 8.6 8.0 6.6 0.0
## 68: 2006 0 0 0.0 0.0 5.1 14.5 2.3 2.1 20.4 0.0
## 69: 2007 0 0 0.0 0.0 0.2 4.3 5.5 12.6 11.0 1.9
## 70: 2008 0 0 0.0 0.0 0.4 18.1 2.0 4.8 18.0 1.6
## 71: 2009 0 0 0.0 0.0 4.3 17.4 8.4 10.9 1.5 2.5
## 72: 2010 0 0 0.0 2.8 0.0 20.9 3.1 13.9 0.0 0.0
## 73: 2011 0 0 0.0 0.0 9.8 33.6 17.0 16.1 8.2 1.9
## 74: 2012 0 0 0.0 0.0 3.0 7.3 4.6 6.1 1.3 0.0
## 75: 2013 0 0 0.0 0.0 0.8 15.0 4.6 15.1 13.8 17.9
## 76: 2014 0 0 0.0 0.0 1.1 15.9 22.7 18.4 4.7 7.0
## 77: 2015 0 0 0.0 0.0 9.4 5.6 5.4 4.9 6.8 0.3
## 78: 2016 0 0 0.0 0.0 5.1 9.5 4.1 12.1 5.4 0.5
## 79: 2017 0 0 0.0 0.0 2.3 15.8 8.4 0.3 4.7 0.5
## 80: 2018 0 0 0.0 0.1 0.6 6.4 20.4 15.9 8.8 26.1
## 81: 2019 0 0 0.0 0.3 4.0 6.7 6.8 39.0 10.5 9.8
## 82: 2020 0 0 0.0 0.0 14.3 11.3 9.8 7.5 1.3 7.3
## 83: 2021 0 0 0.0 9.3 8.8 12.4 7.8 5.9 4.0 0.5
## 84: 2022 0 0 0.0 0.0 1.2 21.5 10.5 10.3 5.1 1.6
## 85: 2023 0 0 0.0 0.4 13.0 19.8 22.3 15.5 15.5 3.8
## 86: 2024 0 0 0.0 2.7 0.5 2.1 2.0 7.0 15.2 0.0
## Winter_end_year JUL AUG SEP OCT NOV DEC JAN FEB MAR APR
## MAY JUN ANN
## <num> <int> <num>
## 1: 0.0 0 39.8
## 2: 0.0 0 45.1
## 3: 0.0 0 52.5
## 4: 0.0 0 23.9
## 5: 0.0 0 34.4
## 6: 0.0 0 26.9
## 7: 0.0 0 33.9
## 8: 3.0 0 39.9
## 9: 0.2 0 25.0
## 10: 0.0 0 49.1
## 11: 0.0 0 38.3
## 12: 0.0 0 51.6
## 13: 0.0 0 88.9
## 14: 0.0 0 79.0
## 15: 0.0 0 42.9
## 16: 2.4 0 25.7
## 17: 0.0 0 33.9
## 18: 0.0 0 45.2
## 19: 0.0 0 39.1
## 20: 0.0 0 21.2
## 21: 0.0 0 19.1
## 22: 0.0 0 31.8
## 23: 0.0 0 40.2
## 24: 0.0 0 81.3
## 25: 0.0 0 34.5
## 26: 0.0 0 28.9
## 27: 0.0 0 73.7
## 28: 0.0 0 36.1
## 29: 0.3 0 78.4
## 30: 0.0 0 17.5
## 31: 0.0 0 68.1
## 32: 0.0 0 63.4
## 33: 0.2 0 54.7
## 34: 0.0 0 64.4
## 35: 0.0 0 41.7
## 36: 0.0 0 51.2
## 37: 0.0 0 64.2
## 38: 1.2 0 54.5
## 39: 0.0 0 43.6
## 40: 0.0 0 50.7
## 41: 0.0 0 68.4
## 42: 0.0 0 53.3
## 43: 0.0 0 21.1
## 44: 0.0 0 95.0
## 45: 0.0 0 74.4
## 46: 0.0 0 98.6
## 47: 0.0 0 72.7
## 48: 0.0 0 69.5
## 49: 0.0 0 17.4
## 50: 0.0 0 42.4
## 51: 0.1 0 70.1
## 52: 0.0 0 35.5
## 53: 0.3 0 43.6
## 54: 0.0 0 84.1
## 55: 0.0 0 47.4
## 56: 0.0 0 55.7
## 57: 0.0 0 29.6
## 58: 0.0 0 55.5
## 59: 0.0 0 73.6
## 60: 0.0 0 45.0
## 61: 0.0 0 56.5
## 62: 0.0 0 36.2
## 63: 0.0 0 75.8
## 64: 0.0 0 66.0
## 65: 0.0 0 35.0
## 66: 0.0 0 66.3
## 67: 0.0 0 25.5
## 68: 0.0 0 44.4
## 69: 0.0 0 35.5
## 70: 0.0 0 44.9
## 71: 0.0 0 45.0
## 72: 0.0 0 40.7
## 73: 0.0 0 86.6
## 74: 0.0 0 22.3
## 75: 0.5 0 67.7
## 76: 0.0 0 69.8
## 77: 0.0 0 32.4
## 78: 0.0 0 36.7
## 79: 0.0 0 32.0
## 80: 0.0 0 78.3
## 81: 0.0 0 77.1
## 82: 0.0 0 51.5
## 83: 0.0 0 48.7
## 84: 0.0 0 50.2
## 85: 0.0 0 90.3
## 86: 0.0 0 29.5
## MAY JUN ANN
#convert to cm
snow[ , names(.SD) := lapply(.SD, function(x){x*2.54}), .SDcols = !c("Winter_end_year")]
#add snow to plant abund data:
a[ , date := as.IDate(SURVEY_START, format = "%m/%d/%Y") , ]
a[ , year := year(date) , ]
a[snow, on = .(year = Winter_end_year ) , annual_snowfall := ANN]
a[ DOW %in% a[ ,.N , DOW][N>2, DOW], .N , DOW]
## DOW N
## <int> <int>
## 1: 62005500 12
## 2: 62022500 10
## 3: 27071100 4
## 4: 81000300 7
## 5: 80003400 5
## 6: 2000400 8
## 7: 62000600 13
## 8: 40000200 4
## 9: 70002200 7
## 10: 34003200 3
## 11: 27006202 7
## 12: 27009501 14
## 13: 27011700 13
## 14: 27104200 9
## 15: 27104501 10
## 16: 41004300 11
## 17: 27002800 10
## 18: 27004800 8
## 19: 27004500 7
## 20: 70006900 8
## 21: 70009100 3
## 22: 27004400 5
## 23: 27019200 16
## 24: 2000900 13
## 25: 10000200 19
## 26: 27007000 10
## 27: 70005000 4
## 28: 82009999 5
## 29: 82011800 22
## 30: 27010400 5
## 31: 71014500 8
## 32: 71014700 8
## 33: 62001100 4
## 34: 10004401 4
## 35: 10004800 14
## 36: 27018600 5
## 37: 82010100 16
## 38: 82010300 14
## 39: 10001300 24
## 40: 10004402 4
## 41: 27005500 6
## 42: 18024300 8
## 43: 49013300 7
## 44: 77004600 7
## 45: 62000100 5
## 46: 73015100 6
## 47: 10004100 4
## 48: 10008800 3
## 49: 29025000 6
## 50: 13002700 6
## 51: 62007500 3
## 52: 27007100 5
## 53: 27011800 4
## 54: 3010700 3
## 55: 10004200 7
## 56: 19002200 3
## 57: 27007800 17
## 58: 10004500 3
## 59: 62005400 8
## 60: 71001300 6
## 61: 27019101 11
## 62: 62023100 11
## 63: 27019102 9
## 64: 83004300 7
## 65: 47002600 5
## 66: 47003200 5
## 67: 73003700 3
## 68: 10005300 3
## 69: 19002500 5
## 70: 82010400 11
## 71: 27003501 5
## 72: 82016300 7
## 73: 27013300 8
## 74: 10004300 4
## 75: 62004700 9
## 76: 30013500 4
## 77: 27062700 3
## 78: 61000600 3
## 79: 27003502 3
## 80: 62005600 3
## 81: 10000700 4
## 82: 66001800 3
## 83: 62004800 3
## 84: 82010600 6
## 85: 82010900 4
## 86: 10005100 3
## 87: 86013900 3
## 88: 82007400 3
## 89: 82001000 3
## 90: 82010700 3
## 91: 82000400 3
## DOW N
a[ , county := substr(str_pad(as.character(DOW),pad = "0", side = "left", width = 8), start = 1, stop = 2) , ]
all_state <- a
rm(a)
metro <- all_state[ county %in% c("02", "27", "19", "62", "82", "10" ,"70") ]
metro[ ,.N , DOW][N>2, DOW]
## [1] 62005500 62022500 27071100 2000400 62000600 70002200 27006202 27009501
## [9] 27011700 27104200 27104501 27002800 27004800 27004500 70006900 70009100
## [17] 27004400 27019200 2000900 10000200 27007000 70005000 82009999 82011800
## [25] 27010400 62001100 10004401 10004800 27018600 82010100 82010300 10001300
## [33] 10004402 27005500 62000100 10004100 10008800 62007500 27007100 27011800
## [41] 10004200 19002200 27007800 10004500 62005400 27019101 62023100 27019102
## [49] 10005300 19002500 82010400 27003501 82016300 27013300 10004300 62004700
## [57] 27062700 27003502 62005600 10000700 62004800 82010600 82010900 10005100
## [65] 82007400 82001000 82010700 82000400
metro[ DOW %in% metro[ ,.N , DOW][N>2, DOW] , hist(year) ]
## $breaks
## [1] 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020 2022 2024
##
## $counts
## [1] 2 2 9 25 50 59 79 72 51 73 69 28
##
## $density
## [1] 0.001926782 0.001926782 0.008670520 0.024084778 0.048169557 0.056840077
## [7] 0.076107900 0.069364162 0.049132948 0.070327553 0.066473988 0.026974952
##
## $mids
## [1] 2001 2003 2005 2007 2009 2011 2013 2015 2017 2019 2021 2023
##
## $xname
## [1] "year"
##
## $equidist
## [1] TRUE
##
## attr(,"class")
## [1] "histogram"
ggplot(metro[DOW %in% metro[year > 2015 ,.N , DOW][N>2, DOW] & year > 2015, , ] , aes( annual_snowfall, clpfoc), )+
geom_point()+
geom_smooth(method = "lm")+
facet_wrap(~DOW, scales = "free")
## `geom_smooth()` using formula = 'y ~ x'
summary(lm(clpfoc~annual_snowfall, data = metro[DOW %in% metro[,.N , DOW][N>2, DOW], , ]))
##
## Call:
## lm(formula = clpfoc ~ annual_snowfall, data = metro[DOW %in%
## metro[, .N, DOW][N > 2, DOW], , ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30789 -0.21291 -0.06681 0.15208 0.71285
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3344886 0.0324794 10.298 <2e-16 ***
## annual_snowfall -0.0002417 0.0002237 -1.081 0.28
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2574 on 517 degrees of freedom
## Multiple R-squared: 0.002253, Adjusted R-squared: 0.0003234
## F-statistic: 1.168 on 1 and 517 DF, p-value: 0.2804
plotpanels <- ggplot(metro[DOW %in% metro[ ,.N , DOW][N>2, DOW], , ], aes( annual_snowfall, clpfoc, group = as.factor(DOW)) )+
geom_point(aes(color = as.factor(DOW)))+
geom_smooth(aes(color = as.factor(DOW)), method = "lm", se = F)
ggplotly(plotpanels)
## `geom_smooth()` using formula = 'y ~ x'
So, from that plot I’d say the answer is no, a lake manager can’t just use the MSP snowcover to assess effects on CLP.
To do list: - exclude non 7co metro -DONE - run before 2016 - DONE -
# make a background of "all data"
ggplot(metro , aes( annual_snowfall, clpfoc), )+
geom_point()
ggplot(metro, aes( annual_snowfall, clpfoc) )+
# geom_point(aes(color = as.factor(DOW)), alpha =.5)+
stat_smooth(geom='line', method = "lm" ,alpha=0.25, se = FALSE, aes(color = as.factor(DOW)), linewidth = 1.0)+
theme_bw()+
guides(color="none")+
geom_smooth(method = "lm", linewidth = 1.5)+
scale_y_continuous(name="Curlyleaf pondweed Abundnace") +
scale_x_continuous(name="Annual Snowfall in Region (cm)")+
theme(axis.text = element_text( size=10),
axis.title.x = element_text(face="bold", size=15),
axis.title.y = element_text(face = "bold", size=15))
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
summary(lm(clpfoc~annual_snowfall, data = metro)) # the unfiltered
##
## Call:
## lm(formula = clpfoc ~ annual_snowfall, data = metro)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.33227 -0.20975 -0.06528 0.15300 0.72882
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3659833 0.0291857 12.540 <2e-16 ***
## annual_snowfall -0.0004841 0.0002024 -2.392 0.0171 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2561 on 627 degrees of freedom
## Multiple R-squared: 0.00904, Adjusted R-squared: 0.00746
## F-statistic: 5.72 on 1 and 627 DF, p-value: 0.01707
summary(lm(clpfoc~annual_snowfall, data = metro[DOW %in% metro[year < 2016 ,.N , DOW][ ,DOW], , ]))
##
## Call:
## lm(formula = clpfoc ~ annual_snowfall, data = metro[DOW %in%
## metro[year < 2016, .N, DOW][, DOW], , ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.33410 -0.20570 -0.06128 0.15491 0.67803
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3694089 0.0301921 12.235 <2e-16 ***
## annual_snowfall -0.0005123 0.0002136 -2.399 0.0168 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2488 on 517 degrees of freedom
## Multiple R-squared: 0.01101, Adjusted R-squared: 0.009092
## F-statistic: 5.753 on 1 and 517 DF, p-value: 0.01681
summary(lm(clpfoc~annual_snowfall, data = metro[DOW %in% metro[year > 2015 ,.N , DOW][ ,DOW], , ]))
##
## Call:
## lm(formula = clpfoc ~ annual_snowfall, data = metro[DOW %in%
## metro[year > 2015, .N, DOW][, DOW], , ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.3124 -0.2023 -0.0663 0.1476 0.7206
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3451136 0.0338422 10.198 <2e-16 ***
## annual_snowfall -0.0003353 0.0002309 -1.452 0.147
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2506 on 469 degrees of freedom
## Multiple R-squared: 0.004477, Adjusted R-squared: 0.002355
## F-statistic: 2.109 on 1 and 469 DF, p-value: 0.1471
# show two lakes on top, one with increasing and one with decreasing snow relationships
# # decrease w/ snow
# ggplot(a[DOW %in% c("62005400"), , ] , aes( annual_snowfall, clpfoc), )+
# geom_point()+
# geom_smooth(method = "lm")
#
#
#
# # increase w/ snow
# ggplot(a[DOW %in% c("82010600"), , ] , aes( annual_snowfall, clpfoc), )+
# geom_point()+
# geom_smooth(method = "lm")
So, from that plot I’d say the answer is no, a lake manager can’t just use the MSP snowcover to assess effects on CLP.